package cn.jetpiece.cloud.joss.app.config.properties;

import lombok.Data;

/**
 * 配置
 *
 * @author XuJZ
 * @since 2020/11/6
 */
@Data
public class OssProperties {
    /**
     * 配置前缀
     */
    public static final String SYNC_PREFIX = "jetpiece.joss";

    /**
     * 最小缓冲大小,默认8k
     */
    private int minBufferSize = 2 << 12;

    /**
     * 最大缓冲大小,默认1M
     */
    private int maxBufferSize = 2 << 20;

    /**
     * 地址前缀
     */
    private String basePreviewUrl = "http://10.1.3.235:7092/joss/";

    /**
     * 对接密钥，用于对象访问地址加密
     */
    private String secretKey = "";

    /**
     * 预地址超时时间，单位秒,默认6分钟
     */
    private Long preExpires = 360L;

    private static OssProperties INSTANCE;

    public static OssProperties getInstance() {
        return INSTANCE;
    }

    public void setInstance(OssProperties instance) {
        OssProperties.INSTANCE = instance;
    }
}
